<template>
	<view class="yang_zhi_info_box">
		<view class="img_box" v-if="yangZhiDetailData.files && yangZhiDetailData.files.length">
			<swiper
				class="img_swiper" 
				:indicator-dots="false"
				autoplay="true"
				:duration="300"
			>
				<swiper-item class="swiper_item" v-for="(item, index2) in yangZhiDetailData.files" :key="index2">
					<image :src="IMG_URL + item.path"></image>
				</swiper-item>
			</swiper>
		</view>
		
		<view class="img_box_empty" v-else>
			<i class="iconfont icon-tianjiatupian1 color_ccc fs_140_i"></i>
		</view>
		
		<view class="popup-content">
			<!-- 分类 -->
			<view class="line h_70 lh_70">
				<view class="label">
					<text class="vertical_text mn pt_10">ᠲᠥᠷᠦᠯ ᠵᠦᠢᠯ</text>
				</view>
				<view class="input category">
					<!-- <text class="vertical_text mn ">{{ yangZhiDetailData.animalId }}</text> -->
					{{ yangZhiDetailData.animalId }}
				</view>
			</view>
			
			<!-- 编号 -->
			<view class="line h_70 lh_70">
				<view class="label">
					<text class="vertical_text mn pt_12">ᠳ᠋ᠤᠭᠠᠷ</text>
				</view>
				<view class="input num">
					{{ yangZhiDetailData.num }}
				</view>
				
			</view>
			
			<!-- 性别 -->
			<view class="line h_70 lh_70">
				<view class="label">
					<text class="vertical_text mn pt_12">ᠬᠦᠢᠰᠦ</text>
				</view>
				<view class="input sex">
					<text class="vertical_text mn">{{ formatSex(yangZhiDetailData.sex) }}</text>
				</view>
			</view>
				
			<!-- 出生日期 -->
			<view class="line h_120">
				<view class="label lh_70">
					<text class="vertical_text mn pt_22">ᠲᠥᠷᠦᠭᠰᠡᠨ ᠡᠳᠦᠷ</text>
				</view>
				<view class="input date_box">
					{{ yangZhiDetailData.birthDay }}
				</view>
			</view>
			
			<!-- 繁殖次数 -->
			<view class="line h_100_i">
				<view class="label lh_70">
					<text class="vertical_text mn pt_8">ᠦᠷᠡᠵᠢᠭᠰᠡᠨ ᠤᠳᠠᠭ᠎ᠠ</text>
				</view>
				<view class="input">
					{{ yangZhiDetailData.breedingCount }}
				</view>
			</view>
				
			<!-- 备注 -->
			<view class="line h_100_i">
				<view class="label lh_70">
					<text class="vertical_text mn pt_16">ᠲᠠᠢᠯᠪᠤᠷᠢ</text>
				</view>
				<view class="input">
					{{ yangZhiDetailData.remarks }}
				</view>
			</view>
			
			<!-- 购入日期 -->
			<view class="line h_120">
				<view class="label lh_70">
					<text class="vertical_text mn pt_8">ᠬᠤᠳᠠᠯᠳᠤᠨ ᠣᠷᠤᠭᠤᠯᠤᠭᠰᠠᠨ ᠡᠳᠦᠷ </text>
				</view>
				<view class="input date_box">
					{{ yangZhiDetailData.fromDay }}
				</view>
			</view>
			
			<!-- 出售人姓名 -->
			<view class="line h_120">
				<view class="label lh_70">
					<text class="vertical_text mn pt_16">{{ formatMon1('ᠬᠤᠳᠠᠯᠳᠤᠭᠴᠢ') }}</text>
				</view>
				<view class="input">
					<text class="vertical_text mn">{{ yangZhiDetailData.sellBy }}</text>
				</view>
			</view>
			
			<!-- 出售人电话 -->
			<view class="line h_120">
				<view class="label lh_70">
					<text class="vertical_text mn pt_16"> {{ formatMon1('ᠬᠤᠳᠠᠯᠳᠤᠭᠴᠢ᠎ ᠶᠢᠨ ᠤᠲᠠᠰᠤ') }}</text>
				</view>
				<view class="input">
					<text class="">{{ yangZhiDetailData.sellByPhone }}</text>
				</view>
			</view>
			
			<!-- 出栏日期 -->
			<view class="line h_120">
				<view class="label lh_70">
					<text class="vertical_text mn pt_12">{{ formatMon1('ᠪᠣᠷᠤᠯᠠᠭᠤᠭᠰᠠᠨ ᠡᠳᠦᠷ') }} </text>
				</view>
				<view class="input date_box">
					{{ yangZhiDetailData.sellDay }}
				</view>
			</view>
			
			<!-- 购买人姓名 -->
			<view class="line h_100">
				<view class="label lh_70">
					<text class="vertical_text mn pt_10">᠎{{ formatMon1('ᠬᠤᠳᠠᠯᠳᠤᠨ ᠠᠪᠤᠭᠴᠢ') }} </text>
				</view>
				<view class="input">
					<text class="vertical_text mn">{{ yangZhiDetailData.fromBy }}</text>
				</view>
			</view>
			
			<!-- 购买人电话 -->
			<view class="line h_110">
				<view class="label lh_70">
					<text class="vertical_text mn pt_10">ᠬᠤᠳᠠᠯᠳᠤᠨ ᠠᠪᠤᠭᠴᠢ ᠶᠢᠨ ᠤᠲᠠᠰᠤ</text>
				</view>
				<view class="input">
					<text class="">{{ yangZhiDetailData.fromByPhone }}</text>
				</view>
			</view>
		</view>	
	</view>
</template>

<script>
	import getSystemInfo from '@/mixins/basic.js'
	const NET = require('@/utils/request')
	const API = require('@/config/api')
	
	export default {
		mixins: [getSystemInfo],
		props: {
			yangZhiDetailData: {
				type: Object,
				default: {}
			}
		},
		data() {
			return {
				
			}
		},
		onLoad() {

		},
		methods: {
			
		}
	}
</script>

<style lang="less" scoped>
	.yang_zhi_info_box {
		width: 100%;
		height: 100%;
		
		.img_box {
			width: 100%;
			height: 400rpx;
			padding: 10rpx 20rpx;
			box-sizing: border-box;
			.img_swiper {
				width: 100%;
				height: 100%;
				.swiper_item {
					width: 100%;
					height: 100%;
					image {
						width: 100%;
						height: 100%;
						border-radius: 10rpx;
					}
				}
			}
		}
		
		.img_box_empty {
			width: 100%;
			height: 400rpx;
			line-height: 400rpx;
			text-align: center;
			
			i { display: inline-block; vertical-align: middle; }
		}
		
		.popup-content {
			width: 100%;
			height: calc(100% - 380rpx);
			overflow-y: auto;
			background-color: #fff;
			
			.title {
				width: 100%;
				padding-left: 10rpx;
				border-bottom: 1px solid #ccc;
				box-sizing: border-box;
				text {
					color: #1c9aa0;
					font-size: 16px;
				}
			}
			
			.line {
				width: 100%;
				display: flex;
				flex-direction: row;
				justify-content: space-between;
				border-bottom: 1px solid #ccc;
				position: relative;
				
				.label {
					width: 30%;
					padding-left: 10px;
					text {
						width: 100%;
					}
				}
				.input {
					width: 60%;
					position: absolute;
					top: 23%;
					left: 35%;
					
					input {
						width: 100%;
					} 
				}
				
				.category { top: 0 !important; }
				.num { top: 0 !important; left: 26% !important; }
				.sex { top: 0 !important; }
				
				.date_box {
					width: 70%;
					top: 30% !important;
				}
			}
		}
	}
</style>